Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
描述: View 是最基础的组件,它支持 Flexbox、touch handling 等功能,并且可以任意嵌套。 不论在什么容器中,View 都直接对应一个容器的原生视图,就像 web 中的 div 一样。 支持任意自定义属性的透传。
$ npm install rax-view --save
注: 1、支持列表中的 代表 h5 代表 weex 代表阿里小程序 代表微信小程序
属性 | 类型 | 默认值 | 必填 | 描述 | 支持 |
---|---|---|---|---|---|
className | string | - | false | 自定义样式名 | |
style | CSSProperties | - | false | 自定义样式 | |
onClick | function | - | false | 点击 | |
onLongpress | function | - | false | 长按 | |
onAppear | function | - | false | 当前元素可见时触发 | |
onDisappear | function | - | false | 当前元素从可见变为不可见时触发 | |
onTouchStart | function | - | false | 触摸动作开始 | |
onTouchMove | function | - | false | 触摸后移动 | |
onTouchEnd | function | - | false | 触摸动作结束 | |
onTouchCancel | function | - | false | 触摸动作被打断,如来电提醒,弹窗 |
import { createElement, useRef, useEffect, render } from "rax";
import DU from "driver-universal";
import View from "rax-view";
const App = () => {
const viewRef = useRef(null);
useEffect(() => {});
return (
<View
ref={viewRef}
style={{
padding: '30rpx'
}}
onClick={() => {
alert("container was clicked!");
}}
>
<View
style={{
width: '300rpx',
height: '300rpx',
backgroundColor: "red"
}}
onClick={e => {
e.stopPropagation();
alert("red was clicked");
}}
/>
<View
style={{
width: '300rpx',
height: '300rpx',
backgroundColor: "green",
position: "absolute",
top: '20rpx',
left: '20rpx'
}}
onClick={() => {
alert("green was clicked");
}}
/>
<View
style={{
width: '300rpx',
height: '300rpx',
backgroundColor: "yellow",
position: "absolute",
top: '80rpx',
left: '210rpx'
}}
onClick={e => {}}
/>
</View>
);
};
render(<App />, document.body, { driver: DU });
FAQs
View component for Rax.
We found that rax-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.